package com.example.entity;

import javax.persistence.*;

import java.time.LocalDateTime;

@Entity
@Table(name = "diagnostic_reports")
public class DiagnosticReport {

    @Id
    @Column(name = "report_id", nullable = false)
    private String reportId;  // 诊断报告ID

    @Column(name = "request_id", nullable = false)
    private String requestId;  // 诊断请求ID，直接存储字符串

    @Column(name = "main_corp", nullable = false)
    private String mainCorp;  // 体质监测结果（例如：气郁质）

    @Column(name = "report_text", columnDefinition = "TEXT")
    private String reportText;  // 诊断报告文本内容

    @Column(name = "created_at", updatable = false)
    private LocalDateTime createdAt;  // 生成时间

    // 默认构造方法
    public DiagnosticReport() {
    }

    // 全参构造方法
    public DiagnosticReport(String reportId, String requestId, String mainCorp, String reportText, LocalDateTime createdAt) {
        this.reportId = reportId;
        this.requestId = requestId;
        this.mainCorp = mainCorp;
        this.reportText = reportText;
        this.createdAt = createdAt;
    }

    // Getters and Setters
    public String getReportId() {
        return reportId;
    }

    public void setReportId(String reportId) {
        this.reportId = reportId;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getMainCorp() {
        return mainCorp;
    }

    public void setMainCorp(String mainCorp) {
        this.mainCorp = mainCorp;
    }

    public String getReportText() {
        return reportText;
    }

    public void setReportText(String reportText) {
        this.reportText = reportText;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
}
